import Vue from "vue"
import VueRouter from "vue-router"
// import VipCar from '../views/vip-car.vue'
import VipBasic from "../views/vip-basic.vue"
import VipRailway from "../views/vip-railway.vue"
// import OwnerPc from '../views/owner-pc.vue'
import DisCenter from "../views/dis-center.vue"
import TradePc from "../views/trade-pc.vue"
// import MerchantPc from '../views/merchant-pc.vue'
import SystemCenter from "../views/system-center.vue"
import ChildWrap from "../views/child-wrap.vue"
import helpCenter from "../views/help-center.vue"

const basename = process.env.NODE_ENV === "production" ? "" : ""

Vue.use(VueRouter)

const routes = [
  {
    path: "/",
    name: "systemCenter",
    component: SystemCenter,
  },
  {
    path: "/child",
    component: ChildWrap,
    children: [
      {
        path: "",
        redirect: "tradePc",
      },
      {
        path: "tradePc",
        name: "tradePc",
        component: TradePc,
      },
      {
        path: "vipRailway",
        name: "vipRailway",
        component: VipRailway,
      },
      {
        path: "vipBasic",
        name: "vipBasic",
        component: VipBasic,
      },
      {
        path: "disCenter",
        name: "disCenter",
        component: DisCenter,
      },
      {
        path: "helpCenter",
        name: "helpCenter",
        component: helpCenter,
      },
    ],
  },
  // {
  //   path: "/vipCar",
  //   name:"vipCar",
  //   component:VipCar
  // },

  // {
  //   path: "/ownerPc",
  //   name: "ownerPc",
  //   component:OwnerPc
  // },

  // {
  //   path: "/merchantPc",
  //   name: "merchantPc",
  //   component:MerchantPc
  // },
  // {
  //   path: "*",
  //   redirect:"/vipCard"
  // }
]

const router = new VueRouter({
  // mode: "hash", // hash模式下，子应用间相互跳转需要手动挂在查询参数 https://wujie-micro.github.io/doc/guide/jump.html
  mode: "history",
  base: basename,
  routes,
})

export default router
